package cartoon.room;

import android.content.Context;

import androidx.room.Database;
import androidx.room.Room;
import androidx.room.RoomDatabase;




@Database(entities = {CartoonHistoryModel.class}, version = 1, exportSchema = false)
public abstract class CartoonHistoryDataBase extends RoomDatabase {
    private static CartoonHistoryDataBase mInstance;
    private static final String  DATABASE_NAME ="carttonhistorys_db.db";

    public static synchronized CartoonHistoryDataBase getInstance(Context context){
        if(mInstance==null){
            mInstance = Room.databaseBuilder(context.getApplicationContext(),
                    CartoonHistoryDataBase.class,
                    DATABASE_NAME)
                    .build();
        }
        return mInstance;
    }

    public abstract CarttonHistoryDao getStudentDao();
}
